.class public Lorg/microemu/android/device/ui/AndroidListUI;
.super Lorg/microemu/android/device/ui/AndroidDisplayableUI;
.source "AndroidListUI.java"

# interfaces
.implements Lorg/microemu/device/ui/ListUI;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;,
        Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;
    }
.end annotation


# instance fields
.field private listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

.field private listView:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;

.field private selectCommand:Ljavax/microedition/lcdui/Command;


# direct methods
.method public constructor <init>(Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/List;)V
    .locals 1
    .parameter "activity"
    .parameter "list"

    .prologue
    .line 32
    invoke-direct {p0, p1, p2}, Lorg/microemu/android/device/ui/AndroidDisplayableUI;-><init>(Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/Displayable;)V

    .line 34
    sget-object v0, Ljavax/microedition/lcdui/List;->SELECT_COMMAND:Ljavax/microedition/lcdui/Command;

    iput-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->selectCommand:Ljavax/microedition/lcdui/Command;

    .line 36
    new-instance v0, Lorg/microemu/android/device/ui/AndroidListUI$1;

    invoke-direct {v0, p0, p1}, Lorg/microemu/android/device/ui/AndroidListUI$1;-><init>(Lorg/microemu/android/device/ui/AndroidListUI;Lorg/microemu/android/MicroEmulatorActivity;)V

    invoke-virtual {p1, v0}, Lorg/microemu/android/MicroEmulatorActivity;->post(Ljava/lang/Runnable;)Z

    .line 57
    return-void
.end method

.method static synthetic access$000(Lorg/microemu/android/device/ui/AndroidListUI;)Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;
    .locals 1
    .parameter "x0"

    .prologue
    .line 23
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

    return-object v0
.end method

.method static synthetic access$002(Lorg/microemu/android/device/ui/AndroidListUI;Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;)Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 23
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

    return-object p1
.end method

.method static synthetic access$200(Lorg/microemu/android/device/ui/AndroidListUI;)Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 23
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listView:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;

    return-object v0
.end method

.method static synthetic access$202(Lorg/microemu/android/device/ui/AndroidListUI;Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;)Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 23
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listView:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;

    return-object p1
.end method

.method static synthetic access$300(Lorg/microemu/android/device/ui/AndroidListUI;)Ljavax/microedition/lcdui/Command;
    .locals 1
    .parameter "x0"

    .prologue
    .line 23
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->selectCommand:Ljavax/microedition/lcdui/Command;

    return-object v0
.end method


# virtual methods
.method public append(Ljava/lang/String;Ljavax/microedition/lcdui/Image;)I
    .locals 3
    .parameter "stringPart"
    .parameter "imagePart"

    .prologue
    .line 65
    :goto_0
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

    if-nez v1, :cond_0

    .line 67
    const-wide/16 v1, 0x64

    :try_start_0
    invoke-static {v1, v2}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 68
    :catch_0
    move-exception v0

    .line 69
    .local v0, ex:Ljava/lang/InterruptedException;
    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_0

    .line 72
    .end local v0           #ex:Ljava/lang/InterruptedException;
    :cond_0
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

    invoke-virtual {v1, p1}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->append(Ljava/lang/String;)I

    move-result v1

    return v1
.end method

.method public getSelectedIndex()I
    .locals 1

    .prologue
    .line 76
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listView:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;

    invoke-virtual {v0}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListView;->getSelectedItemPosition()I

    move-result v0

    return v0
.end method

.method public getString(I)Ljava/lang/String;
    .locals 1
    .parameter "elementNum"

    .prologue
    .line 80
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI;->listAdapter:Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;

    invoke-virtual {v0, p1}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljava/lang/String;

    return-object p0
.end method

.method public setSelectCommand(Ljavax/microedition/lcdui/Command;)V
    .locals 0
    .parameter "command"

    .prologue
    .line 84
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidListUI;->selectCommand:Ljavax/microedition/lcdui/Command;

    .line 85
    return-void
.end method
